<%-- 
    Document   : displayIssues
    Created on : Feb 26, 2014, 6:30:12 AM
    Author     : bamidei
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="./BugTrackcss.css">
        <title>Team-A BugTracker - Issue List</title>
    </head>
    <body><div id="maincontainer">
            <div id="topsection"><div class="innertube">
                </div></div>
            <div id="contentwrapper">
                <div id="contentcolumn"> <div class="innertube">
                   <h2>Issue List</h2>
                   <input type="button" value="Logout" onclick="window.location = 'Logout'">&nbsp;&nbsp;
                    <input type="button" value="Report a New Issue" onClick="window.location = 'editIssue?id=-1'"> 
                        <hr>
                        <div id="tablearea">
                            <c:if test="${msg!=null}"> <font color="green"> ${msg} </font> </c:if> 
                            <c:if test="${error!=null}"> <font color="red"> ${error} </font> </c:if>         
                                <table border=1 cellpadding=3 cellspacing=0 bordercolor="black">
                                    <tr>
                                        <th>ID</th>
                                        <th><input type="button" value="Severity" onClick="window.location = 'Sort?sortBy=1'"></th>
                                        <th>Application</th>
                                        <th>Version</th>
                                        <th>Summary</th>
                                        <th><input type="button" value="Sbmitted By" onClick="window.location = 'Sort?sortBy=3'"></th>
                                        <th>Date</th>
                                        <th><input type="button" value="Assigned To" onClick="window.location = 'Sort?sortBy=2'"></th>
                                        <th>Status</th>
                                        <th>Notify</th>
                                    </tr>
                                <c:forEach items="${issueList}"  var="Issue">
                                    <tr>
                                        <td><input type="button" value="${Issue.issueId}" onClick="window.location = 'editIssue?id=${Issue.issueId}'"></td>
                                        <td>${Issue.priorityLabel}</td>
                                        <td>${Issue.appName}</td>
                                        <td>${Issue.appVersion}</td>
                                        <td>${Issue.issueSummary}</td>
                                        <td>${Issue.submitByName}</td>
                                        <td>${Issue.createdDate}</td>
                                        <td>${Issue.assignToName}</td>
                                        <td>${Issue.status}</td>
                                        <td><input type="button" value="Notify" onClick="window.location = 'Email?id=${Issue.issueId}'"></td>"
                                    </tr>
                                </c:forEach>
                            </table>
                        </div>
                        <hr>
                        
                    </div> </div>
            </div>
            <div id="leftcolumn">
                <div class="innertube"> </div>
            </div>
            <div id="footer">Team A Java Programming II</div>
        </div>
    </body>
</html>




